package com.lzx.applib.utils;

/**
 * Created by Administrator on 16/11/06.
 */

public class PointUtil {

    private PointUtil() {}

    public static float getDistance(float x1, float y1, float x2, float y2) {
        return (float) Math.sqrt(Math.pow(x1-x2, 2) + Math.pow(y1-y2, 2));
    }

    public static float getGradient(float x1, float y1, float x2, float y2) {
        return (y2 - y1) / (x2 - x1);
    }
}
